import { StringDict } from "msal/lib-commonjs/MsalTypes";

export class AppConsts {

    static readonly tenancyNamePlaceHolderInUrl = '{TENANCY_NAME}';

    static remoteServiceBaseUrl: string;
    static remoteServiceWebBaseUrl:string;
    static remoteServiceFileBaseUrl:string;
    static remoteServiceBaseUrlFormat: string;
    static appBaseUrl: string;
    static appBaseHref: string; // returns angular's base-href parameter value if used during the publish
    static appBaseUrlFormat: string;
    static recaptchaSiteKey: string;
    static subscriptionExpireNootifyDayCount: number;

    static localeMappings: any = [];

    static readonly userManagement = {
        defaultAdminUserName: ['admin', 'system', 'mountor'],
        isSuper: 30149,
        isAdmin: 20534
    };

    static readonly localization = {
        defaultLocalizationSourceName: 'MtSite'
    };

    static readonly authorization = {
        encrptedAuthTokenName: 'enc_auth_token'
    };

    static readonly grid = {
        defaultPageSize: 10
    };

    static readonly MinimumUpgradePaymentAmount = 1;

    /// <summary>
    /// Gets current version of the application.
    /// It's also shown in the web page.
    /// </summary>
    static readonly WebAppGuiVersion = '2.0.4';

    static readonly EventName = {
        //看是否需要调整页面布局(未使用，当前在DefaultLayoutComponent中触发)
        appAsideTogglerOnClick : 'app.aside_toggler.onClick',
        appTopMenuTogglerOnClick: 'app.topMenu_toggler.onClick',

        appShowLinkedAccountsModal: 'app.show.linkedAccountsModal',
        appShowUserDelegationsModal: 'app.show.userDelegationsModal',
        appShowChangePasswordModal: 'app.show.changePasswordModal',
        appShowChangeProfilePictureModal: 'app.show.changeProfilePictureModal',
        appShowMySettingsModal: 'app.show.mySettingsModal',
        showImageView: 'app.show.showImageView',
    }

    static readonly PermssionModules = {
        content:'App.Module.Content', 
        content2:'App.Module.Content2',
        message:'App.Module.Messages',
        financialProduct:'App.Module.FinancialProduct',
        recruitment:'App.Module.Recruitment',
        exrate:'App.Module.Exrate',
        jobApplied:'App.Module.JobApplied'
    }

    static readonly ckeditor = {
        language: 'en',
        getConfig: function (index) {
            return {
                //autosave: { SaveKey: 'autosave_' + window.location + "_" + index },
                language: AppConsts.ckeditor.language
            };
        }
    }
}
